﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PromoServer_WPF.Views
{
    /// <summary>
    /// Interaction logic for VideoLayoutView.xaml
    /// </summary>
    public partial class VideoLayoutView : UserControl
    {
        public VideoLayoutView()
        {
            InitializeComponent();
        }

        private void videoFileButton_Click(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
            dlg.Filter = "Video files|*.wmv;*.mpg;*.avi";

            // If user clicks open
            if (dlg.ShowDialog() == true)
            {
                // Load video to media element
                videoMediaElement.Source = new Uri(dlg.FileName);
            }
        }
    }
}
